<template>
  <div>
    <div class="panel">
      <div
        class="item"
        v-for="item in data"
        :key="item.code"
      >
        <div class="name">{{item.name}} · {{item.code}}</div>
        <van-grid :column-num="3" :border="false">
          <van-grid-item>
            <div class="value">{{item.pj}}</div>
            <div class="text">评级</div>
          </van-grid-item>
          <van-grid-item>
            <div class="value">{{item.xjbzgj}}</div>
            <div class="text">现价比转股价</div>
          </van-grid-item>
          <van-grid-item>
            <div class="value">{{item.gm}}亿</div>
            <div class="text">规模</div>
          </van-grid-item>
        </van-grid>
      </div>
    </div>
    <van-notice-bar
      wrapable
      :scrollable="false"
      text="在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。"
    />
  </div>
</template>

<script>
  export default {
    name: 'index',
    props: {
      data: {
        type: Array,
        default: () => []
      }
    }
  };
</script>

<style scoped lang="less">
  .panel {
    background: #fff;
    padding: 12px;

    .text {
      color: #646566;
      font-size: 12px;
      line-height: 1.5;
    }

    .value {
      font-size: 18px;
    }
  }
</style>
